{extend name="public/base" /}
{block name="pjax_container"}
<?php
    $titleTypeName = '主题详情';
?>
<section class="content-header">
    <h4>{$titleTypeName}</h4>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> {$titleTypeName}</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST"
                  action="/{$Think.MODULE_NAME}/{$Think.CONTROLLER_NAME}/{$Think.ACTION_NAME}" onsubmit="return false">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm"
                                                  style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                    </ul>

                    <div class="tab-content">
                        {if condition="$theme['check_status'] == 2"}
                        <div class="bh_image" style="position: absolute;top: 0px;left: 100px;"><img src="__STATIC__/bh.png"></div>
                        {/if}
                        <div class="form-group">
                            <label class="col-sm-2 control-label">主题名称</label>
                            <div class="col-sm-7" style="padding-top: 7px;">
                                {$theme.theme}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-7" style="padding-top: 7px;">
                                {$theme.desc}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">奖扣时间</label>
                            <div class="col-sm-7" style="padding-top: 7px;">
                                {:date('Y-m-d',$theme.prize_buckle_time)}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">统计</label>
                            <div class="col-sm-7" style="padding-top: 7px;">
                                <span>B分：{$theme.integral_b_add}/{$theme.integral_b_del??0}</span>
                                <span style="margin-left: 30px;">A分：{$theme.integral_a_add}/{$theme.integral_a_del??0}</span>
                            </div>
                        </div>

                        {if condition="$theme['check_status'] == 2"}
                            <div class="form-group">
                                {if condition="$theme['reject_type'] == 2"}
                                    <label class="col-sm-2 control-label">终审驳回意见:</label>
                                    <div class="col-sm-7" style="padding-top: 7px;">
                                    <span>{$theme['last_check_opinion']}</span>
                                {elseif condition="$theme['reject_type'] == 1"}
                                    <label class="col-sm-2 control-label">初审驳回意见:</label>
                                    <div class="col-sm-7" style="padding-top: 7px;">
                                    <span>{$theme['first_check_opinion']}</span>
                                {/if}
                                    </div>
                            </div>
                        {/if}

                        <ul class="nav nav-tabs" style="margin-bottom: 40px;">
                            <li role="presentation" class="fq_nav fq_nav_1 active"><a href="#">奖扣详情</a></li>
                            <!--<li role="presentation" class="fq_nav fq_nav_2"><a href="#">参与人</a></li>-->
                            <li role="presentation" class="fq_nav fq_nav_3"><a href="#">审批流程</a></li>
                            <!--<li role="presentation" class="fq_nav fq_nav_4"><a href="#">报名</a></li>-->
                        </ul>
                        <div class=" tab_1">
                            {volist name="$event" id='v'}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">事件类型</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {$v.cate_name}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">事件</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {$v.name}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {$v.event_desc}
                                </div>
                            </div>
                                {volist name="$v.user_list" id="va"}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">参与人</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <span>{$va.user_name}</span>
                                    <span style="margin-left: 30px;">B分:{$va.integral_b??0}</span>
                                    <span style="margin-left: 30px;">A分:{$va.integral_a??0}</span>
                                    {if condition="$va.is_lottery_ticket eq 1"}
                                    <span style="margin-left: 30px;">奖票</span>
                                    {/if}
                                    <span style="margin-left: 30px;">计件:{$va.piece_rate??1}</span>
                                </div>
                            </div>
                                {/volist}
                            {php}  $img = explode(',',$v['img']); {/php}
                            {if condition="!empty($img[0])"}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">事件图片</label>

                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {volist name="$img" id="vb"}
                                    <a href="{$vb}" target="_blank"><img style="width: 100px;height: 100px;border-radius: 50%;" src="{$vb}" alt=""></a>
                                    {/volist}
                                </div>

                            </div>
                            {/if}
                            {/volist}
                        </div>
                        <div style="display: none;" class=" tab_2">
                            <table class="table table-striped" style="text-align: center;">
                                <tr>
                                    <th style="text-align: center;">姓名</th>
                                    <th style="text-align: center;">工号</th>
                                    <th style="text-align: center;">部门</th>
                                </tr>
                                <tr>
                                    <td>王凯</td>
                                    <td>005</td>
                                    <td>管理层</td>
                                </tr>
                                <tr>
                                    <td>王凯</td>
                                    <td>005</td>
                                    <td>管理层</td>
                                </tr>
                                <tr>
                                    <td>王凯</td>
                                    <td>005</td>
                                    <td>管理层</td>
                                </tr>
                                <tr>
                                    <td>王凯</td>
                                    <td>005</td>
                                    <td>管理层</td>
                                </tr>
                            </table>
                        </div>
                        <div style="display: none;" class=" tab_3">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">终审</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <div>终审人: {$theme.c_name}</div>
                                    <div>终审意见: {$theme.last_check_opinion}</div>
                                    <div>终审状态: {if condition="$theme.status eq 2"}已审核{else:}未审核{/if}</div>
                                    <div>终审时间: {if condition="$theme.status eq 2"}{:date('Y-m-d H:i',$theme.last_check_time)}{/if}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">初审</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <div>初审人: {$theme.b_name}</div>
                                    <div>初审意见: {$theme.first_check_opinion}</div>
                                    <div>初审状态: {if condition="$theme.status neq 0"}已审核{else:}未审核{/if}</div>
                                    <div>初审时间: {if condition="$theme.status neq 0"}{:date('Y-m-d H:i',$theme.first_check_time)}{/if}</div>
                                </div>
                            </div>
                        </div>
                        <div style="display: none;" class=" tab_4">
                            <table class="table table-striped" style="text-align: center;">
                                <tr>
                                    <th style="text-align: center;">姓名</th>
                                    <th style="text-align: center;">工号</th>
                                    <th style="text-align: center;">部门</th>
                                </tr>
                                <tr>
                                    <td style="display: flex;align-items: center;justify-content: center;"><img style="width: 30px;height: 30px;border-radius: 50%;"
                                             src="https://static.oschina.net/uploads/user/694/1388888_50.jpg?t=1532752186000" alt="">
                                        <div style="margin-left: 10px;">王凯</div>
                                        <div style="margin-left: 20px;">理由：节目表演</div>
                                    </td>
                                    <td>005</td>
                                    <td>管理层</td>
                                </tr>
                            </table>
                        </div>
                    </div>


                </div>
            </form>
        </div>
    </div>
</section>
<script type="application/javascript">
    $(document).ready(function () {
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language: "zh-CN"});

    })
    $('.minimal').on('click', function () {
        var type = $(this).val();
        if (type == 2) {
            $('.check').show();
        } else if (type == 1) {
            $('.check').hide();
        }

    });
</script>
<script>
    $('.fq_nav').click(function () {
        $('.fq_nav').removeClass('active');
        $(this).addClass('active')
    })
    $('.fq_nav_1').click(function () {
        $('.tab_1').show();
        $('.tab_2').hide();
        $('.tab_3').hide();
        $('.tab_4').hide();
    })
    $('.fq_nav_2').click(function () {
        $('.tab_1').hide();
        $('.tab_2').show();
        $('.tab_3').hide();
        $('.tab_4').hide();
    })
    $('.fq_nav_3').click(function () {
        $('.tab_1').hide();
        $('.tab_2').hide();
        $('.tab_3').show();
        $('.tab_4').hide();
    })
    $('.fq_nav_4').click(function () {
        $('.tab_1').hide();
        $('.tab_2').hide();
        $('.tab_3').hide();
        $('.tab_4').show();
    })
</script>
{/block}
